Skip to content

fix(flowchat): fix arbitrary turn navigation across renderer handoff - #1935

Merged
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:dev2
Jul 31, 2026
Merged

fix(flowchat): fix arbitrary turn navigation across renderer handoff#1935
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:dev2

Conversation

@wsp1911

@wsp1911 wsp1911 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix arbitrary FlowChat turn navigation during and after streaming, including navigation across the static-history to Virtuoso renderer handoff.

Type and Areas

Type:

  • bug fix
  • regression fix
  • UI/UX
  • docs
  • test

Areas:

  • Web UI
  • FlowChat

Motivation / Impact

Previously, arbitrary turn navigation could remain pending, jump back to the bottom, or stop working after a new turn switched rendering modes.

This change:

  • Preserves the existing footer and pin range while distant targets materialize.
  • Uses local Virtuoso data indices for navigation APIs.
  • Resolves pending navigation through rangeChanged and bounded retries.
  • Carries pending targets through the static-history to Virtuoso handoff.
  • Aligns the target user message to the shared top offset.
  • Adds cancellation and timeout recovery without silently falling to the bottom.
  • Rebinds ScrollAnchor to the concrete scroller element.
  • Adds regression tests and scroll stability documentation.

Verification

  • pnpm run type-check:web
  • pnpm --dir src/web-ui run lint
  • pnpm --dir src/web-ui run test:run src/flow_chat/components/modern/VirtualMessageList.session-boundary.test.tsx src/flow_chat/components/modern/ScrollAnchor.test.tsx
  • git diff --check
  • Focused tests: 51 passed
  • Manual reproduction confirmed that arbitrary turn navigation works during and after streaming.

Reviewer Notes

  • Virtuoso navigation now uses local data indices; firstItemIndex remains only a rendering coordinate.
  • Navigation follows a materialize-then-align transaction.
  • The existing physical range is preserved until the new target is rendered and aligned.
  • rangeChanged participates in target materialization, with bounded RAF retries as fallback.
  • The root flowchat-turn-navigation-fix-plan.md file is an explicitly requested durable diagnostic and design artifact.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@wsp1911
wsp1911 merged commit 2fc1b04 into GCWing:main Jul 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant